<template>
  <div class="myBorderBox6">
    <a class="myBorderBox6-content">
      <span></span>
      <span></span>
      <span></span>
      <span></span>
      <slot></slot>
    </a>
  </div>
</template>

<script setup></script>

<style scoped lang="scss">
.myBorderBox6 {
  width: 100%;
  height: 100%;
  padding: 1px;
  box-sizing: border-box;
}

.myBorderBox6-content {
  width: 100%;
  height: 100%;
  position: relative;
  display: inline-block;
  // color: #4ed0db;
  text-decoration: none;
  text-transform: uppercase;
  // transition: 8s;
  // letter-spacing: 4px;
  // overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #235fa7;
  padding: 1px;
}
.myBorderBox6-content span {
  position: absolute;
  display: block;
}
.myBorderBox6-content span:nth-child(1) {
  top: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #4ed0db);
  animation: animate1 3s linear infinite;
}
@keyframes animate1 {
  0% {
    left: -100%;
  }
  50%,
  100% {
    left: 100%;
  }
}
.myBorderBox6-content span:nth-child(2) {
  top: -100%;
  right: -2px;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, transparent, #4ed0db);
  animation: animate2 3s linear infinite;
}
@keyframes animate2 {
  0% {
    top: -100%;
  }
  50%,
  100% {
    top: 100%;
  }
}
.myBorderBox6-content span:nth-child(3) {
  bottom: -2px;
  right: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(270deg, transparent, #4ed0db);
  animation: animate3 3s linear infinite;
}
@keyframes animate3 {
  0% {
    right: -100%;
  }
  50%,
  100% {
    right: 100%;
  }
}
.myBorderBox6-content span:nth-child(4) {
  bottom: -100%;
  left: -2px;
  width: 3px;
  height: 100%;
  background: linear-gradient(360deg, transparent, #4ed0db);
  animation: animate4 3s linear infinite;
}
@keyframes animate4 {
  0% {
    bottom: -100%;
  }
  50%,
  100% {
    bottom: 100%;
  }
}

.myBorderBox6-content span:nth-child(1) {
  animation-delay: 0.75s;
}
.myBorderBox6-content span:nth-child(2) {
  animation-delay: 1.5s;
}
.myBorderBox6-content span:nth-child(3) {
  animation-delay: 2.25s;
}
.myBorderBox6-content span:nth-child(4) {
  animation-delay: 3s;
}
</style>
